//
//  OANetworkManagerTests.m
//  OANetworkManagerTests
//
//  Created by GuoRui on 02/01/2018.
//  Copyright (c) 2018 GuoRui. All rights reserved.
//

#import "Tests.h"

@implementation Tests

- (void)setUp
{
    [super setUp];
    // Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown
{
    // Put teardown code here. This method is called after the invocation of each test method in the class.
    [super tearDown];
}

- (void)expectation:(void (^)(void (^)()))handler
{
    XCTestExpectation *exp = [self expectationWithDescription:@"这里可以是操作出错的原因描述。。。"];
    
    handler(^{
        [exp fulfill];
    });
    
    [self waitForExpectationsWithTimeout:60 handler:^(NSError * _Nullable error) {
        if (error) {
            NSLog(@"Timeout Error: %@", error);
        }
    }];
}

- (void)testExample
{
    XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
}


-(long long)getTimeDateWithString:(NSString *)dateString{
    
    NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
    [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
    NSDate *date = [formatter dateFromString:dateString];
    long long dateTime  = [date timeIntervalSince1970] * 1000;

    return dateTime;
}


@end

